<style>
    #qu_select{
        position: relative;
        top:14px;
    }
    .btn-group input[type="submit"]{
        position: relative;
        top:10px;
        left:10px;
    }
</style>
<div class="content">
    <div class="header">
        <h1 class="page-title">优惠码列表</h1>
    </div>
    <ul class="breadcrumb">
        <!--<li><a href="index.html">Home</a> <span class="divider">/</span></li>-->
        <li class="active">List</li>
    </ul>

    <div class="container-fluid">
        <div class="row-fluid">

            <div class="btn-toolbar">
                <button class="btn btn-primary" onClick="location='<?php echo url('Admin/Index/code_add'); ?>'"><i class="icon-plus"></i>添加优惠码</button>
                <div class="btn-group">
                </div>
            </div>
            <div class="well">
                <table class="table">
                    <thead>
                    <tr>
                        <th>优惠码id</th>
                        <th>优惠码</th>
                        <th>添加时间</th>
                        <th>是否已用</th>
                        <th style="width: 50px;"></th>
                    </tr>
                    </thead>
                    <tbody>
                    <?php foreach ( $code_list as $key => $val ) { ?>
                    <tr>
                        <td><?php echo $val['co_id']; ?></td>
                        <td style="text-overflow:ellipsis;width:300px;"><?php echo $val['co_code']; ?></td>
                        <td ><?php echo date('Y-m-d',$val['co_addtime']); ?></td>
                        <td><?php echo $val['co_status'] == 1 ? '是':'否'  ; ?></td>
                        <td>
                            <a href="<?php echo url('Admin/Index/code_del',array('co_id'=>$val['co_id'])); ?>" role="button" ><i class="icon-remove"></i></a>
                        </td>
                    </tr>
                    <?php } ?>
                    </tbody>
                </table>
            </div>
            <div class="pagination">
                <ul>
                    <?php echo $code_list->render(); ?>
                </ul>
            </div>